#define _CRT_SECURE_NO_WARNINGS	
#include<iostream>
#include<stdio.h>
using namespace std;
typedef int E;
#define MaxVertex 10

typedef struct MatrixGraph {
	int vertexCount;
	int edgeCount;
	int matrix[MaxVertex][MaxVertex];
	E data[MaxVertex];
}*Graph;

typedef int T;
struct QueueNode {
	T element;
	struct QueueNode* next;
};
typedef struct QueueNode* QNode;
struct Queue {
	QNode front, rear;
};
typedef struct Queue* LinkedQueue;
int initQueue(LinkedQueue queue);
int offerQueue(LinkedQueue queue, T element);
int isEmpty(LinkedQueue queue);
T pollQueue(LinkedQueue queue);

//create
Graph Create();
//add
void addVertex(Graph graph, E element);
void addEdge(Graph graph, int i, int j);
int getArrayIndex(Graph graph, E element);
//display
void printGraph(Graph graph);
//dfs
void DFsTraverse(Graph graph);
void DFS(Graph graph, int v);
//bfs
void BFS(Graph graph, LinkedQueue queue);



	